﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;

namespace Runda.CMS.Service.RundaService
{
    public partial class MailService : ServiceBase
    {
        private MailProcessor MailSender = new MailProcessor(int.Parse(System.Configuration.ConfigurationManager.AppSettings["ThreadCount"]));
        private BillProcessor billProcessor = new BillProcessor(1);

        public MailService()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            MailSender.Start();
            billProcessor.Start();
        }

        protected override void OnStop()
        {
            MailSender.Sotp();
            billProcessor.Sotp();
        }
    }
}
